Memory Cache with Partial Cache Line Valid States

ABSTRACT

An apparatus includes a cache memory circuit configured to store a cache lines, and a cache controller circuit. The cache controller circuit is configured to receive a read request to an address associated with a portion of a cache line. In response to an indication that the portion of the cache line currently has at least a first sub-portion that is invalid and at least a second sub-portion that is modified relative to a version in a memory, the cache controller circuit is further configured to fetch values corresponding to the address from the memory, to generate an updated version of the portion of the cache line by using the fetched values to update the first sub-portion, but not the second sub-portion, of the portion of the cache line, and to generate a response to the read request that includes the updated version of the portion of the cache line.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of U.S. application Ser. No.17/320,172, entitled “Memory Cache with Partial Cache Line ValidStates,” filed May 13, 2021 (now U.S. Pat. No. 11,586,552), thedisclosure of which is incorporated by reference herein in its entirety.

BACKGROUND Technical Field

Embodiments described herein are related to systems-on-a-chip (SoCs)and, more particularly, to methods for operating a cache memory.

Description of the Related Art

System-on-a-chip (SoC) integrated circuits (ICs) generally include oneor more processors that serve as central processing units (CPUs) for asystem, along with various other components such as memory controllersand peripheral components. Cache memories are frequently used in SoCs tosupport increased performance of processors by reducing delaysassociated with memory fetches to system memories and/or non-volatilestorage memories. Cache memories may store local copies of informationstored in frequently accessed memory addresses. These local copies mayhave shorter delays for providing stored values to processors thanperforming a memory access to a target memory address.

When a memory access is made to a target address that is not currentlycached, the addressed memory may be accessed, and values from aplurality of sequential addresses, including the target address, areread as a group and may then be cached to reduce future access times. Insome cache memories, a single cache line may be sized to hold a singlegroup. In other embodiments, one group may span across two or more cachelines. Individual cache lines are maintained through use of acorresponding cache tag that provides information on the respectivecache line, such as validity of the information in the cache line. Whenthe cached information in a cache line becomes invalid or adetermination that the cached information has not be accessedfrequently, the cached information may be invalidated and marked foreviction, thereby allowing it to be overwritten by other informationbeing accessed by the processors of the SoC.

SUMMARY

In an embodiment, an apparatus includes a cache memory circuit that isconfigured to store a plurality of cache lines, and a cache controllercircuit. The cache controller circuit is configured to receive a readrequest to an address associated with a portion of a particular cacheline. In response to an indication that the portion of the particularcache line currently has at least a first sub-portion that is invalidand at least a second sub-portion that is modified relative to a versionin a memory, the cache controller circuit may be further configured tofetch values corresponding to the address from the memory, to generatean updated version of the portion of the particular cache line by usingthe fetched values to update the first sub-portion, but not the secondsub-portion, of the portion of the particular cache line, and togenerate a response to the read request that includes the updatedversion of the portion of the particular cache line.

In a further example, the cache controller circuit may be furtherconfigured to set a value in a cache tag associated with the portion ofthe particular cache line to indicate a partial state, the partial stateindicative of the invalid first sub-portion and the modified secondsub-portion, and to set the value in the cache tag to indicate a fullstate, the full state indicative of the updated version of the invalidfirst sub-portion. In an example, the cache controller circuit may befurther configured to receive a partial write request to a differentaddress that corresponds to a portion of a different cache line. Inresponse to a determination that a value in a different cache tagcorresponding to the portion of the different cache line indicates apartial state, the cache controller circuit may be configured to storevalid values of the partial write request in corresponding entries ofthe portion of the different cache line without modifying remainingentries in the portion.

In another example, in response to a determination that the partialwrite request modified all invalid values in the portion of thedifferent cache line, the cache controller circuit may be configured toset the value in the cache tag to indicate a full state. In anembodiment, the cache controller circuit may be further configured toreceive a subsequent read request to the address associated with theportion of the particular cache line. In response to a determinationthat the portion of the particular cache line is currently valid, thecache controller circuit may be configured to generate a response to thesubsequent read request that includes the portion of the particularcache line.

In a further embodiment, the cache controller circuit may be furtherconfigured to receive a subsequent read request to a different addressassociated with a portion of a different cache line. In response to anindication that the portion of the different cache line currently has afirst sub-portion that is invalid and a second sub-portion that isunmodified relative to a version in the memory, the cache controllercircuit may be configured to fetch different values corresponding to thedifferent address from the memory, to generate a response to thesubsequent read request that includes the different fetched values, andto update the portion of the different cache line.

In another example, the cache controller circuit may be furtherconfigured to send a request to a memory controller to store the updatedversion of the portion of the particular cache line to locations in thememory corresponding to the address. In a further example, the cachecontroller circuit may be further configured to track validity of datastored in a given cache line for individual bytes of the given cacheline, and to maintain respective cache tags for two portions of thegiven cache line, wherein each of the two portions is a respective halfof the given cache line.

BRIEF DESCRIPTION OF THE DRAWINGS

The following detailed description makes reference to the accompanyingdrawings, which are now briefly described.

FIG. 1 illustrates a block diagram of an embodiment of a system thatincludes a cache memory system and a memory.

FIG. 2 shows a three tables depicting two cache lines and a cache tagtable of an embodiment of a cache memory system.

FIG. 3 depicts tables showing states of a cache line and a cache tagtable before and after performing a read request in an embodiment of thecache memory system of FIG. 2 .

FIG. 4 illustrates tables depicting states of a cache line and a cachetag table before and after performing a partial write request in anembodiment of the cache memory system of FIG. 2 .

FIG. 5 shows tables illustrating states of a cache line and a cache tagtable before and after receiving a notification in an embodiment of thecache memory system of FIG. 2 .

FIG. 6 illustrates a flow diagram of an embodiment of a method forperforming a read request in a cache memory system.

FIG. 7 shows a flow diagram of an embodiment of a method for performinga partial write request in a cache memory system.

FIG. 8 depicts a flow diagram of an embodiment of a method for receivingan indication that entries in a cache line have been invalidated in acache memory system.

FIG. 9 illustrates various embodiments of systems that include coupledintegrated circuits.

FIG. 10 shows a block diagram of an example computer-readable medium,according to some embodiments.

While embodiments described in this disclosure may be susceptible tovarious modifications and alternative forms, specific embodimentsthereof are shown by way of example in the drawings and will herein bedescribed in detail. It should be understood, however, that the drawingsand detailed description thereto are not intended to limit theembodiments to the particular form disclosed, but on the contrary, theintention is to cover all modifications, equivalents and alternativesfalling within the spirit and scope of the appended claims.

DETAILED DESCRIPTION OF EMBODIMENTS

As described, a size of a cache line may be determined by an SoCdesigner based on a size of a memory access group. Some memory circuits,in response to a read access, return a sequence of words correspondingto a series of consecutive addresses. For example, many dynamicrandom-access memories (DRAMs) return all words stored in a singlephysical row of the memory. For efficiency, all of the read words may beplaced into one or more cache lines rather than performing subsequentread accesses to the memory if another address from the same memory rowis fetched. As memory sizes grow, however, the size of a row of DRAMmemory may also grow. Accordingly, cache line sizes may also grow toefficiently cache all of the read words.

A processor coupled to a particular cache may not, however, be capableof managing an entire cache line of words, or receiving such a quantityof words may reduce the performance of the processor. Some processors,therefore, receive a portion of the words in a given cache line, such ashalf of a cache line rather than the all words in the cache line. Thereduced number of words received by the processor may allow theprocessor to perform at an increased level.

While large cache lines may increase an efficiency of accesses to asystem memory, managing cached data may become less efficient. Forexample, if a cache line stores 128 bytes, and a single byte isinvalidated (e.g., the value is modified by a processing circuit notassociated with the cache), then the entire cache line may be identifiedas invalid even though 127 bytes remain valid. Accordingly, some cachememories may support validity tracking using portions of a cache linesmaller than the entire cache line. For example, validity may be trackedby half-cache lines, quarter cache lines, words of 16, 32, 64, or morebits, or even down to a byte level. By tracking validity to the bytelevel, the single byte of the 128 bytes may be indicated as invalidwhile the other 127 bytes remain valid for use by processors associatedwith the cache. This more granular level of validity tracking, however,may result in use of read-modify-write operations to read or write datain a cache line. For example, a read request from a processor to anaddress corresponding to a cache line with at least one invalid entrymay result in a read of the cache line as well as a read of the systemmemory to replace the invalid entry. Results of the two reads are mergedand the merged result may be returned to the requesting processor. Thismay, in some embodiments, result in a longer access time than a simpleread to the system memory.

As previously stated, some embodiments utilize a half-cache line accessby the processors coupled to a given cache. By tracking cache statesusing half-cache lines, a cache controller may determine when aread-modify-write operation is not necessary for a given half-cacheline. If one or more invalid entries are in an accessed half-cache line,then the read-modify-write operation is used. Otherwise, once allentries in the given half-cache line have been filled with validinformation, then the read-modify-write operation may be omitted andreplaced with a simpler read or write operation.

The disclosed embodiments address systems and methods for tracking afill state of a cache line at a half-cache tag level is disclosed. Thedisclosed methods may increase an efficiency for accessing cached datain a cache that allows data manipulation down to a byte-level. Forexample, an SoC may include a cache memory circuit and a cachecontroller circuit that is configured to receive a read request to anaddress associated with a portion of a particular cache line. The cachecontroller may, in response to an indication that the portion currentlyhas one or more invalid entries and at least one modified entry, beconfigured to fetch values corresponding to the address from the memory,and then generate an updated version of the portion of the particularcache line by using the fetched values to update the invalid entries,but not the modified entries. The cache controller circuit may befurther configured to generate a response to the read request thatincludes the updated version of the portion of the particular cacheline.

FIG. 1 illustrates a block diagram of one embodiment of a cache memorysystem. As illustrated, system 100 includes cache memory system 105,processor circuit 160, and memory 145. Cache memory system 105, in turn,includes cache controller circuit 101 and cache memory circuit 110.Cache memory circuit 110 is shown with entries corresponding to twocache lines, 120 and 122. Each of cache lines 120 and 122 include tworespective portions.

As illustrated, processor circuit 160 is a circuit that is capable ofinitiating a memory access as part of a memory transaction and receivinga response to the memory access. Processor circuit 160 is configured togenerate read and write requests for addresses in memory 145, and toretrieve and execute instructions from cache memory system 105.Processor circuit 160 may include one or more cores and be configured toimplement any suitable instruction set architecture (ISA), such as,e.g., ARM™, PowerPC®, Blackfin®, or x86 ISAs, or combination thereof. Inembodiments, processor circuit 160 may be a specialized core such as afloating-point processor, a digital-signal processor, or the like.

Memory 145, as shown, may be implemented as any suitable type of memorycircuits including volatile, non-volatile memory, and combinationsthereof. Memory 145 may include one or more memory managementcontrollers and may include memory circuits, such as, staticrandom-access memory (SRAM), as well as interfaces for accessing dynamicrandom-access memory (DRAM) and/or non-volatile memories such as flashmemory. As an example, memory 145 may include SRAM, a first memorycontroller circuit for accessing DRAM, and a second memory controllerfor accessing flash memory. Program instructions and various types ofdata files may be stored in the flash data for long-term storage, suchas when system 100 is powered-down. During a boot process, an operatingsystem and one or more applications may be launched, including copyingat least some of the instructions and related information into DRAMand/or SRAM for faster access by processor circuit 160.

To further reduce access times to the subsets of the booted operatingsystem and/or launched applications, memory locations that are accessedby processor circuit 160 may be cached in cache memory system 105. Cachememory system 105 is configured to cache, in portions of cache lines 120and 122, values associated with memory 145 in response to the read andwrite requests generated by processor circuit 160. As shown, memory 145includes addresses 150 a-150 h and 152 a-152 h.

Cache memory circuit 110, as illustrated, is configured to store aplurality of cache lines, including cache lines 120 and 122. Once datahas been cached, each of cache lines 120 and 122 may be accessed byprocessor circuit 160 by portions 120 a, 120 b, 122 a, and 122 b. Asillustrated, each portion is one-half of a cache line. In otherembodiments, cache lines 120 and 122 may be divided into smallerportions, such as thirds, fourths, eighths, and so forth. In someembodiments, a portion of cache lines 120 and 122 may include the entirecache line. Each of the illustrated portions includes a number ofentries, each entry including a byte or word of data corresponding to anaddress in memory 145. Cache line 120 is shown with eight entries 130a-130 h that correspond to memory addresses 150 a-150 h, and cache line122 with entries 132 a-132 h that correspond to memory addresses 152a-152 h. Portions 120 a-120 b and 122 a-122 b each include a respectivefour of the entries.

Cache controller circuit 101, as depicted, is configured to determinewhen and where to store a particular set of accessed memory locations.Based on an address used to fetch data from memory 145, cache controllercircuit 101 determines one or more possible cache lines in cache memorycircuit 110 in which to store the returned data. To make suchdeterminations, cache controller circuit 101 is further configured totrack validity of each individual entry within a given cache line. Asshown, cache controller circuit 101 tracks if a given entry is “valid”(the data stored in the entry has a same value as the correspondingaddress in memory 145 and has not been modified outside of cache memorycircuit 110 by a different circuit within system 100), “modified” (thedata stored in the entry has been modified such that the value in theentry in cache memory circuit 110 differs from the value stored at thecorresponding address in memory 145), and “invalid” (the data stored inthe entry has been modified outside of cache memory circuit 110 by adifferent circuit). Since the validity of cached data is maintained foreach entry, processor circuit 160 may read the modified or validcontents of entries 132 b and 132 c, respectively, even though entries132 a and 132 d are invalid.

As illustrated, cache controller circuit 101 is configured to receiveread request 170 to an address associated with portion 122 a of cacheline 122 (also referred to as a cache hit in portion 122 a). In responseto an indication that portion 122 a of cache line 122 currently has atleast a first sub-portion that is invalid (e.g., entries 132 a and 132d) and at least a second sub-portion (e.g., entry 132 b) that ismodified relative to a version in memory 145, cache controller circuit101 is configured to fetch values corresponding to the address frommemory 145. After the fetched values are returned from memory 145, cachecontroller circuit 101 is further configured to generate updated portion122 c of cache line 122 by using the fetched values (memory addresses152 a-152 d) to update the first sub-portion (entries 132 a and 132 d),but not the second sub-portion (entry 132 b), of portion 122 a. Afterupdated portion 122 c has been generated, cache controller circuit 101is configured to generate response 175 to read request 170 that includesupdated portion 122 c of cache line 122.

Cache controller circuit 101, as depicted, is configured to indicate,for portion 122 a of cache line 122, a partial state indicating thatportion 122 a currently includes the first sub-portion that is invalidand the second sub-portion that is modified relative to thecorresponding address in memory 145. When a hit portion of a given cacheline, such as portion 122 a, is in the partial state, the invalidentries are updated before returning the values of the hit cache line tothe requesting processor. Otherwise, the requesting processor wouldreceive out-of-date data, which could lead to incorrect functioning,including, for example, a crash of an application running on theprocessor, or even a crash of an operating system. Values for themodified entries, however, may only be valid in the hit cache line, as abackfill may not have been performed or may still be in progress in thememory system. Accordingly, to provide this most recently modified valuethat is stored in entry 132 b, the value is provided from portion 122 aof cache line 122, and therefore is not overwritten by the value inmemory 145 (address 152 b) which has yet to be updated to the value incache line entry 132 b. Since the value in entry 132 c is valid, thisvalue is the same as the value in memory address 152 c. Accordingly, invarious embodiments, values for valid entries may be provided from theread of portion 122 a or from the read of memory 145.

In addition to generating updated portion 122 c, cache controllercircuit 101, as shown, is further configured to update invalid entries132 a and 132 d using the values from the corresponding memory addresses152 a and 152 d. After this update, cache controller circuit 101 tracksthe updated entries as valid. Accordingly, cache controller circuit 101is further configured to receive a subsequent read request to theaddress associated with portion 122 a of cache line 122, and in responseto a determination that portion 122 a of cache line 122 is currentlyvalid, generate a response to the subsequent read request that includesportion 122 a of cache line 122. After all entries 132 a-132 d ofportion 122 a are updated in response to read request 170, all of theentries of portion 122 a are either valid or modified. When thesubsequent read request is received, cache controller circuit 101 mayomit a fetch of values from memory 145 and instead return the justvalues from portion 122 a.

By tracking validity of data in cache lines at a cache entry level, datastored in cache lines may be used for more accesses before the cacheline is invalidated and eventually evicted and refilled. Validitytracking at the entry level may, however, result in use of moreread-modify-write operations to compensate for invalid data in a hitcache line. By tracking a partial state of a retrievable portion of acache line, a cache controller may be capable of determining whether aread-modify-write operation is to be used to provide accurate datavalues to a requesting circuit. Since a read-modify-write operation thatincludes a system-memory access may take a longer time to perform thanjust a system memory access, determining when a read-modify-writeoperation is avoidable may reduce a time for providing results to therequesting circuit, and thereby increase bandwidth of the requestingcircuit.

It is noted that system 100, as illustrated in FIG. 1 , is merely anexample. The illustration of FIG. 1 has been simplified to highlightfeatures relevant to this disclosure. Various embodiments may includedifferent configurations of the circuit elements. For example, only twocache lines are shown for cache memory circuit 110. Any suitable numberof cache lines may be included in other embodiments. In addition, asingle processor circuit and single memory are shown. In otherembodiments, multiple processor circuits and/or multiple memories may beincluded in system 100.

The cache memory system illustrated in FIG. 1 is shown in a simplifieddepiction. Cache memory systems may be implemented in various fashions.One example of a cache memory system is shown in FIG. 2 .

Moving to FIG. 2 , three tables depicting an embodiment of a cachememory system is shown. FIG. 2 depicts a different embodiment of cachememory system 105 of FIG. 1 , in which cache lines and portions thereofinclude additional entries. Cache memory system 105, as shown, includesdepictions of two cache lines, 120 and 122, each including tworespective portions with eight entries included in each portion. Cacheline 220 includes portion 120 a with entries 230 a-230 h, and portion120 b with entries 230 i-230 p. Similarly, cache line 222 includesportion 22 a with entries 232 a-232 h, and portion 122 b with entries232 i-232 p. Cache memory system 105 also includes cache tag table 240.Each row of cache tag table 240 depicts one cache tag, each tagincluding a cache line identification (ID) 242, an address hash 244, andtwo state indicators, one for each portion of a corresponding cacheline.

As illustrated, cache tag table is maintained by a cache controllercircuit, such as cache controller circuit 101 in FIG. 1 . Cache tagtable 240 is shown with two tags, one corresponding to cache line 220and the other corresponding to cache line 222. Cache line ID 242identifies a particular cache line to which a given cache tagcorresponds. The two values of cache line ID 242 (“220” and “222”)indicate that a first cache tag corresponds to cache line 220 and asecond cache tag corresponds to cache line 222. In some embodiments,cache line ID 242 may be implemented as address decode logic for amemory such as an SRAM or a register file, such that a particular numberof bits corresponding to the address comprise the cache tag for thecorresponding cache line. In other embodiments, cache line ID 242 may beincluded in memory cells of a memory circuit used to store cache tagtable 240, such as a content-addressable memory.

Address hash 244, as shown, is a hash of an address in a system memory,such as memory 145 in FIG. 1 . Address hash 244 is used by the cachecontroller circuit to determine if an address in a received memoryrequest hits or misses a cache line in cache memory system 105. Anysuitable hashing algorithm may be used for determining respectiveaddress hashes 244. For example, when a read request 170 is received bycache controller circuit 101, an address in read request 170 thatcorresponds to a location in memory 145 is processed using the hashingalgorithm, and the resulting hash value is compared to address hashes244 in cache tag table 240, if there is a match, then read request 170hits a cache line, and values corresponding to the location in memory145 are cached within cache memory system 105, allowing for apotentially faster access to the values than if memory 145 were accessedinstead. In some embodiments, an address hash 244 may be included foreach portion of a given cache line. In other embodiments, a portion ofthe address from the memory request is used to determine which portionof a hit cache line corresponds to the address.

As illustrated, each cache tag in cache tag table 240 also includesstate 246. Each value of state 246 includes one or more bitscorresponding to a state of each portion of the corresponding cacheline. For example, state 246 for cache line 220 includes three bits inthe “a” column to indicate a state of “111” for portion 120 a, and threebits in the “b” column to indicate a state of “001” for portion 120 b.Although three bits are used in the illustrated example, any suitablenumber of bits may be used to track a desired number of states.

Using three bits, up to eight different states may be tracked for eachportion, including, for example, invalid, clean, full, data pending,data pending modified, partial, cache tag locked clean and cache taglocked full. “Invalid” corresponds to the associated cache line portionhaving at least one entry that is invalid and any remaining entriesbeing clean. “Clean” refers to a portion in which all entries are validand unmodified, meaning the values in all entries of the portion are thesame as the values in the corresponding location in memory 145. “Full”refers to all entries being valid (no invalid entries) and at least oneentry having a modified value that has not been written back to memory145. Any remaining unmodified entries are clean. “Data pending” includesportions in which a fetch has been initiated to memory 145 to fill orupdate the entries of the portion. “Tag lock clean” and “tag lock full”indicate that the associated portions are locked from further use andare marked for eviction. If one entry in the portion is modified, thenthe tag lock full state is used, otherwise all entries are clean.

“Partial” refers to a portion in which at least one entry is invalid andat least one entry is modified from the memory 145. Any additionalentries may be clean. When a portion of a cache line is invalid, aparticular entry is used to store a valid mask that indicates whichentries of the portion are valid. Entry 230 h is used in portion 120 ato store the valid mask. As described above in regards to FIG. 1 , aread request that hits a portion with a partial state, such as portion120 a, results in a read-modify-write operation being performed toupdate the invalid entries. The read-modify-write operation includes afetch to memory 145 to retrieve values for updating the invalid entries.After the fetch is initiated, the state of a partial portion is updatedto “data pending partial” to indicate that the fetch is in progress.

Cache controller circuit 101, as illustrated, is configured to set avalue in a given cache tag associated with a given portion of aparticular cache line to indicate a respective state. For example, cachecontroller circuit 101 is configured to set a value in the cache tagassociated with portion 120 a of cache line 220 to indicate the partialstate. As described, the partial state is indicative of invalid entries230 d and 230 g and modified entries 230 c and 230 e. In addition, the“valid mask” value is placed into portion 120 a in place of an invalidentry, so entry 230 h may also be invalid. The further presence of cleanentries 230 a, 230 b, and 230 f does not impact the current partialstate of portion 120 a.

If a memory fetch is issued by cache controller circuit 101 to updateinvalid entries 230 d, 230 g, and 230 h, then cache controller circuit101 is configured to set the value of the cache tag for portion 120 a toindicate the data pending partial state. After the invalid entries areupdated, cache controller circuit 101 is configured to set the value ofthe cache tag for portion 120 a to indicate the full state, as entries230 d, 230 g, and 230 h will now be clean. Cache controller circuit 101is also configured to set a value in the cache tag associated withportion 122 a to the modified state, and to set a value in the cachetags associated with portion 120 b of cache line 220 and portion 122 bof cache line 222 to indicate clean states.

In some embodiments, cache controller circuit 101 is configured to trackvalidity of data stored in a given cache line for individual bytes ofthe cache line. Accordingly, in such embodiments, each of entries 230and 232 correspond to one byte of data. In other embodiments, a singlecache entry may correspond to 16-, 32-, 64-, or any other suitable sizeof word. As illustrated, cache controller circuit 101 is configured tomaintain respective cache tags for two portions of a given cache line,each of the two portions corresponding to a respective half of the givencache line.

It is noted that the embodiment of FIG. 2 is one depiction of a cachememory system. Although only two cache lines are shown, in otherembodiments, any suitable number of cache lines may be included. Inaddition, although two portions are depicted for each cache line, cacheline may be divided into any suitable number of portions, or may betracked as a single portion for the entire cache line. The sixteenentries of the example cache lines are but one example chosen forclarity. A given cache line may include any suitable number of entriesper cache line in other embodiments.

The description of FIG. 2 illustrates an organizational structure formanaging validity of data in a cache memory system. Cache line statesmay change over time as memory requests are received in a system such assystem 100. FIGS. 3-5 depict three examples of how a cache controllercircuit manages cached data and cache tags for an example of a portionof a cache line.

Turning to FIG. 3 , an example of managing a cache memory system inresponse to a read request is shown. An example of cache line portion120 a and cache tag table 240 of cache memory system 105 are illustratedat different times, before and after cache memory system 105 receivesread request 370 that hits portion 120 a.

At time t0, portion 120 a is in the partial state, as shown by thecorresponding cache tag in cache tag table 240. The value of state 246for portion 120 a is “111,” indicating the partial state. A firstsub-portion of portion 120 a (e.g., entries 230 d, 230 g, and 230 h) areinvalid, and a second sub-portion of portion 120 a (e.g., entries 230 cand 230 e) are modified. Memory addresses corresponding to the cachedvalues in portion 120 a are shown in memory 145.

At time t1, as illustrated, read request 370 is received from processorcircuit 160. Read request 370 has a target address of 350 d of memory145, which is a cache hit for portion 120 a. Since portion 120 a has apartial state, at least one entry in portion 120 a is modified from itsrespective location in memory 145. In this example, entries 230 c and230 e (storing data 335 c and 335 e, respectively) are modified from therespective memory addresses 350 c and 350 e of memory 145 (storing data355 c and 355 e, respectively). The values of data 335 c and 335 e arenewer than the values of data 355 c and 355 e. Since entries 230 d and230 g are invalid, the values of data 335 d and 335 g are older thanvalues of data 355 d and 355 g, while the value of mask 365 in entry 230h is not the same as the value of data 355 h.

As illustrated, all values corresponding to a portion of a cache lineare returned in response to a read request to any one address withinthat cache line. Accordingly, cache controller circuit 101 performs aread-modify-write operation to merge the modified second sub-portion ofportion 120 a with values from memory 145. To merge the values, cachecontroller circuit 101 issues memory fetch 371 to retrieve values foraddresses 350 a-350 h while concurrently access values from entries 230a-230 h with cache fetch 372. After data 355 a-355 h has been receivedfrom memory 145, cache controller circuit 101 uses mask 365 to determinewhich entries are replaced with the data from memory 145. In the presentexample, as shown at time t2, data 355 d, 355 g, and 355 h replace theformer values in respective entries 230 d, 230 g, and 230 h, and aretracked by cache controller circuit 101 as now being clean. State 246for portion 120 a is updated to “010” to indicate the modified statesince entries 230 c and 230 e are still modified in comparison toaddresses 350 c and 350 e, which have yet to be backfilled. Furthermore,cache controller circuit 101 is configured to generate a response toread request 370 that includes the updated version of portion 120 a.

After time t2, if cache controller circuit 101 receives a subsequentread request to an address associated with portion 120 a, then, inresponse to a determination that the portion of the particular cacheline is currently valid (e.g., modified or clean), cache controllercircuit 101 is configured to generate a response to this subsequent readrequest that includes the portion of the particular cache line.

If, at time t0, entries 230 d, 230 g, and 230 h are invalid as shown,but none of the valid entries are modified (e.g., the remaining entriesare all clean), then portion 120 a is in an invalid state and a cacheread to an address associated with portion 120 a is treated as a miss.Repeating the example of FIG. 3 with no modified entries, cachecontroller circuit 101 receives read request 370 to address 350 dassociated with portion 120 a. In response to an indication (e.g., fromthe corresponding cache tag) that portion 120 a currently has a firstsub-portion that is invalid (entries 230 d, 230 g, and 230 h) andremaining entries are unmodified relative to addresses 350 a-350 h inmemory 145, then cache controller circuit 101 is configured to fetchvalues corresponding to the address from memory 145 (memory fetch 371),and generate a response to read request 370 that includes the fetchedvalues from memory 145. Cache controller circuit 101 is furtherconfigured to update portion 120 a using the fetched values from memory145 and update the state 246 of portion 120 a to clean.

Proceeding to FIG. 4 , an example of managing a cache memory system inresponse to a partial write request is shown. The example of cache lineportion 120 a and cache tag table 240 are reused from FIG. 3 ,originating in the same state at time t0. A partial write request 470 isreceived at time t1.

Partial write request 470, as shown, includes new values for three ofthe eight entries 230 in portion 120 a. In response to a partial writerequest, only values corresponding to specific addresses are modified.Non-addressed values remain unchanged. At time t1, cache controllercircuit 101 receives partial write request 470 to address 350 d thatcorresponds to portion 120 a. Partial write request 470 includes newvalues for addresses 350 d, 350 g, and 350 h, which correspond toentries 230 d, 230 g, and 230 h, respectively, of portion 120 a. Inresponse to a determination that a value for state 246 in the cache tagcorresponding to portion 120 a indicates a partial state (e.g., thevalue “111”), cache controller circuit 101 is configured to store validvalues of partial write request 470 in entries 230 d, 230 g, and 230 h,of portion 120 a without modifying remaining entries in portion 120 a.For example, cache controller circuit 101 may issue cache fetch 472 toretrieve the values in portion 120 a, update the values in entries 230d, 230 g, and 230 h, and then store the modified values back intoportion 120 a.

At time t2, cache controller circuit 101 is further configured to, inresponse to a determination that partial write request 470 modified allinvalid values in portion 120 a, set the value for state 246 in cachetag table to indicate the full state (e.g., “010”). For example, cachecontroller circuit 101 updates mask 365 to indicate the newly modifiedentries are modified. In response to a determination, using the updatedmask 365, that no entries of portion 120 a remain invalid, cachecontroller circuit 101 updates the value of state 246 corresponding toportion 120 a. The value for the updated mask 365 may further bediscarded since all entries are now valid. Cache controller circuit 101may further issue a backfill request to memory 145 to update the valuesof the corresponding addresses in memory 145 to the modified values inportion 120 a. Such a backfill request may, however, have a lowpriority, and portion 120 a remains in the full state until after thebackfill has been completed.

If cache controller circuit 101, for example, receives a subsequent readrequest to the address associated with portion 120 a, then cachecontroller circuit 101 is further configured to, in response to adetermination that portion 120 a is currently valid (e.g., in the fullstate or the clean state), generate a response to the subsequent readrequest that includes values currently stored in portion 120 a. Forexample, a memory read request that hits on portion 120 a while it is inthe full state, causes cache controller circuit 101 to return the cachedvalues in entries 230 a-230 h without accessing memory 145.

Moving to FIG. 5 , an example of managing a cache memory system, inresponse to a notification of cached data being modified externally tocache memory system 105, is depicted. In this example, cache lineportion 120 b and cache tag table 240 are reused from FIG. 2 .Notification 570 is received at time t1.

As illustrated, portion 120 b of cache line 220 includes seven entriesthat are clean (entries 230 l-230 o) and entry 230 p that is modified.Accordingly, a value of state 246 corresponding to portion 120 b (“010”)indicates that portion 120 b is in the full state. At time t1, cachecontroller circuit 101, as shown, receives notification 570 that one ormore values corresponding to a first sub-portion of portion 120 b havebeen modified external to cache memory circuit 110. In the example,values corresponding to entries 230 j-230 l have been modified outsideof cache memory circuit 110. In various embodiments, the modificationsmay have been implemented directly to addresses 350 j-350 l in memory145, or entries in a different cache memory system that also correspondto addresses 350 j -350 l were modified. In either case, the values inentries 230 j-230 l do not represent the latest values associated withaddresses 350 j-350 l. Cache controller circuit 101 uses notification570 to generate mask 565, to identify the now invalid entries 230 j -230l.

As illustrated at time t2, cache controller circuit 101 is configured todetermine whether any modified values remain in a second sub-portion(entries 230 i, and 230 m-230 p) of portion 120 b. In response to adetermination that at least one modified value remains in the secondsub-portion (entry 230 p), cache controller circuit 101 is furtherconfigured to store a partial state flag value (e.g., “111”) in thecache tag corresponding to portion 120 b to indicate the partial state.In addition, cache controller circuit 101 is configured to replace oneof the invalid entries with mask 565. In the illustrated example, themask value is always stored in the most significant entry of anassociated portion. Placing the mask value in a same relative entry inan associated portion allows cache controller circuit 101 to know whichentry includes the mask value without having to make a separatedetermination when one or more invalid entries are included in a givenportion. In other embodiments, a different one of the entries may beutilized. To store mask 565, cache controller circuit 101 shifts valuesin all valid entries (clean or modified) to the next least significantentry until a first invalid entry is overwritten. In the presentexample, data values 335 m-335 p are shifted into entries 230 l-230 o,and mask 565 is placed into entry 230 p.

If at time t0, entry 230 p is clean rather than modified as shown, cachecontroller circuit 101 is configured to, in response to a determinationthat no modified values remain in the second sub-portion, store apartial clean flag value in the cache tag to indicate that at least onevalue in portion 120 b is invalid but no valid values in the portion aremodified relative to their corresponding addresses in memory 145. In theexamples disclosed herein, a partial clean state corresponds to theinvalid state. In other words, since none of the valid values aremodified, these valid values can be read from memory 145, and theportion of the cache line could be evicted without losing modified data.A read request that hits in portion 120 b will instead be treated as amiss, and the values will be fetched from memory 145. These fetchedvalues, in addition to being returned to the requestor (e.g., processorcircuit 160), may also be used to update the invalid entries of portion120 b and place portion 120 b in a clean state.

In some embodiments, in response to the invalid state of portion 120 b,cache controller circuit 101 is further configured to determine toinvalidate cache line 220, including portion 120 b. For example, ifportion 120 a is in the clean or invalid state when portion 120 b isplaced into the invalid state, then cache controller circuit 101 maydetermine that the entire cache line may be invalidated and evictedwithout losing any modified values. In response to this determination,cache controller circuit 101 is configured to indicate a locked state(e.g., tag lock clean, as described above) for each portion (220 a and220 b) of cache line 220. This locked state may prevent furthermodifications to the values in portions 220 a and 220 b until cache line220 has been evicted.

It is further noted that the examples of FIGS. 3-5 are merely fordemonstrating the disclosed techniques. In these examples, cache tagtable 240 has been shown with two cache tags, each including aparticular number of values. In other embodiments, any suitable numberof cache tags may be included to track any suitable number of cachelines included in the cache memory system. The three examples are notintended to describe all possible cases related to cache line managementand validity tracking, but rather to provide sufficient details fordisclosing the associated techniques.

The circuits and techniques described above in regards to FIGS. 1-5 maymanage a cache memory system using a variety of methods. Three methodsassociated with cache memory management are described below in regardsto FIGS. 6-8 .

Moving now to FIG. 6 , a flow diagram for an embodiment of a method forreceiving a read request by a cache memory system is shown. Method 600may be performed by a cache controller circuit, such as cache controllercircuit 101 in FIG. 1 . Referring collectively to FIGS. 1 and 6 , method600 begins in block 610.

At block 610, method 600 includes indicating, by cache controllercircuit 101 coupled to cache memory circuit 110, a partial state forportion 122 a of cache line 122 of cache memory circuit 110 in responseto determining that portion 122 a currently includes a first sub-portionthat is invalid and a second sub-portion that is modified relative to aversion in memory 145. As shown in FIG. 1 , the first sub-portionincludes entries 132 a and 132 d that are both invalid, while the secondsub-portion includes entry 132 b that currently stores a modified valuethat has not yet been backfilled into a corresponding memory location ofmemory 145. Indicating the partial state includes storing, by cachecontroller circuit 101, a particular value in a cache tag associatedwith portion 122 a of cache line 122. For example, a value for state 246in cache tag table 240 of FIG. 2 may be set to indicate the partialstate in a cache tag corresponding to portion 122 a.

Method 600, at block 620, further includes receiving, by cachecontroller circuit 101, read request 170 for an address associated withportion 122 a of cache line 122. Read request 170, as illustrated, issent by processor circuit 160, targeting one or more addresses that areassociated with values currently cached in portion 122 a of cache memorycircuit 110. In some embodiments, cache controller circuit 101 returnsall values in a given portion of a cache line in response to at leastone value in the portion is read. Accordingly, cache controller circuit101 prepares to send all values in entries 132 a-132 d in response toread request 170.

At block 630, method 600 also includes fetching, by cache controllercircuit 101, values from memory 145 corresponding to the address. Cachecontroller circuit 101, in response to determining that the valuescached in entries 132 a and 132 d are invalid, issues a fetch request tomemory 145 to retrieve the current values corresponding to entries 132 aand 132 d. As shown, values from memory addresses 152 a-152 d correspondto the currently cached values in entries 132 a-132 d..

Method 600 also includes, at block 640, updating, by cache controllercircuit 101 using the fetched values, values of the first sub-portion,while values of the second sub-portion remain unchanged. As stated, thevalues in entries 132 a and 132 d are to be updated before responding toread request 170. Since the value in 132 b is modified and, therefore,newer than the corresponding value in memory address 152 b, the value in132 b must not be overwritten. The retrieved values from addresses 152 aand 152 d are, therefore, stored in entries 132 a and 132 d, makingthese values clean, and therefore valid. The retrieved value fromaddress 152 b is ignored, allowing the current value in entry 132 b toremain. It is noted that, since the value in entry 132 c is valid andclean, it matches the retrieved value from address 152 c. Accordingly,cache controller circuit 101 may, in various embodiments, eitheroverwrite the cached value in entry 132 c with the same retrieved value,or ignore the value retrieved from 152 c.

At block 650, the method further includes responding, by cachecontroller circuit 101, to read request 170, wherein response 175includes the updated values of the first-portion and the unchangedvalues of the second portion. The updated values in portion 122 a areprepared, by cache controller circuit 101, to be sent in response 175back to processor circuit 160. The state of portion 122 a may also beupdated, e.g., in an associated cache tag, to indicate that portion 122a includes clean entries and modified entries, but no invalid entries(e.g., portion 122 a is in the full state as described above).

In some embodiments, method 600 may end in block 650, or in otherembodiments, may repeat some or all operations. For example, method 600may return to block 620 in response to receiving a different readrequest to a different portion that is indicated as being in the partialstate. It is noted that the method of FIG. 6 is merely an example forperforming a read request in a cache memory system.

Turning now to FIG. 7 , a flow diagram for an embodiment of a method forreceiving a partial write request by a cache memory system is shown. Ina similar manner as method 600, method 700 may be performed by a cachecontroller circuit, such as cache controller circuit 101 in FIG. 1 .Referring collectively to FIGS. 1, 4, and 7 , method 700 begins in block710.

Method 700, at block 710, includes setting, by cache controller circuit101 coupled to cache memory circuit 110, a value in a cache tagassociated with a portion of a different cache line to indicate apartial state, the partial state indicative of an invalid firstsub-portion and a modified second sub-portion of the portion of thedifferent cache line. As illustrated, cache controller circuit 101 mayset, for a cache tag corresponding to portion 120 a, a state indicator,such as state 246 in cache tag table 240 of FIG. 2 , to a particularvalue (e.g., “111”) to indicate that portion 120 a is in the partialstate. Portion 120 a is in the partial state due to a first sub-portion,including entries 230 d, 230 g, and 230 h, having invalid (or in thecase of 230 h, mask 365) values, and due to entries 230 c and 230 ehaving modified values.

At block 720, method 700 includes receiving, by cache controller circuit101, partial write request 470 for an address associated with portion120 a. As illustrated, partial write request 470 includes three valuesto be stored in memory addresses 455 d, 455 g, and 455 h of memory 145.These addresses are currently cached in portion 120 a, and therefore,the values included in partial write request 470 will be stored in cachememory circuit 110.

At block 730, the method also includes storing, by cache controllercircuit 101, valid values of partial write request 470 in correspondingentries of portion 120 a without modifying remaining entries in portion120 a. As shown, entries 230 d, 230 g, and 230 h of portion 120 acurrently correspond to memory addresses 455 d, 455 g, and 455 h. Thevalues from partial write request 470 are, therefore, respectivelystored in entries 230 d, 230 g, and 230 h. Values in the other entriesof portion 120 a remain unchanged.

Method 700 further includes, at block 740, in response to determiningthat partial write request 470 modified all invalid values in portion120 a, setting, by cache controller circuit 101, the value in the cachetag to indicate a full state. Cache controller circuit 101, as shown,determines that after partial write request 470 is fulfilled in portion120 a, that none of entries 230 a-230 h currently include invalidvalues. Entries 230 a, 230 b, and 230 f include clean values, matchingthe values in their corresponding memory addresses. The remainingentries, including the three that were just written, include modifiedvalues.

The method, at block 750, also includes requesting, by cache controllercircuit 101, a memory controller to store the updated version of portion120 a to locations in memory 145 corresponding to the address. Asdepicted, cache controller circuit 101 may issue backfill requests forthe three entries that were just modified. Since cache memory system 105intercepts partial write request 470 from memory 145, cache controllercircuit 101 issues the backfill request to update the memory addressesthat were targeted by partial write request 470 with the same data.These back fill request may be sent to a memory controller circuitincluded in, or otherwise associated with, memory 145. Cache controllercircuit 101 may also issue backfill requests for any of the othermodified entries for which a backfill request has not already beenissued. Once the backfill requests are fulfilled, then the correspondingentries 230 in portion 120 a may be clean, and the corresponding cachetag may be updated to indicate that portion 120 a is in the clean state.

In some embodiments, method 700 may end in block 750, or in otherembodiments, may repeat some or all operations. For example, method 700may return to block 720 in response to receiving a different partialwrite request to a different portion. It is noted that method 700 is anexample for performing a partial write request in a cache memory system.

Proceeding now to FIG. 8 , a flow diagram for an embodiment of a methodfor receiving, by a cache memory system, a notification of amodification of data cached in the cache memory system is shown. Similarto methods 600 and 700, method 800 may be performed by a cachecontroller circuit, such as cache controller circuit 101 in FIG. 1 .Referring collectively to FIGS. 1, 5, and 7 , method 700 begins in block710.

Method 800, at block 810, includes, in response to an updating,indicating, by cache controller circuit 101, a modified state forportion 120 b of cache line 120 by storing a different value in a cachetag, the modified state indicating no invalid values and one or moremodified values in portion 120 a. As shown in FIG. 5 , entries 230 i-230o include clean values that match their respective addresses in memory145, while entry 230 p includes a modified value that has not yet beenbackfilled into its corresponding memory location in memory 145.Indicating the modified state (also referred to as the full state)includes storing, by cache controller circuit 101, a particular value ina cache tag associated with portion 120 b. For example, a value (e.g.,“010” as shown in FIG. 5 ) for state 246 in cache tag table 240 of FIG.2 may be set to indicate the modified state in a cache tag correspondingto portion 120 b.

At block 820, method 800 includes, in response to indicating thatportion 120 b is in the modified state, performing, by cache controllercircuit 101, a read operation on portion 120 b in response to a readrequest to an address associated with portion 120 b. A read request maybe received, by cache controller circuit 101 from, e.g., processorcircuit 160. The read request may include a request for values from oneor more memory addresses that correspond to values currently cached inportion 120 b. Since there are no invalid entries in portion 120 b,cache controller circuit 101 may read the values from portion 120 b andsend them in a response to processor circuit 160 without performing anadditional fetch request for data from memory 145.

Method 800 further includes, at block 830, subsequently receiving, bycache controller circuit 101, notification 570 that one or more valuescorresponding to a first sub-portion of portion 120 b have been modifiedexternal to cache memory system 105. As depicted, notification 570 maybe received from any functional circuit included in system 100 thatincludes circuits for tracking coherency of cached values. For example,system 100 may include two or more cache memory circuits, includingother instances of cache memory system 105, a different type of cachememory system, or combinations thereof In various embodiments,respective cache controller circuits may include coherency circuits andin response to modifying a respective cached value, issue anotification, such as notification 570, to the other cache memorycircuits to inform them of the modification. In other embodiments,system 100 may include a centralized coherency circuit that receivesindications of modifications from the respective cache memory systemsand then issues notifications to cache memories known to be cachingvalues from the same memory addresses.

The method, at block 840, also includes indicating, by cache controllercircuit 101, the partial state for portion 120 b. In response tonotification 570, cache controller circuit 101 determines a secondsub-portion of entries 230 i-230 p that remain valid (either clean ormodified) and a determines which of the entries are in the invalidatedfirst sub-portion based on notification 570. Cache controller circuit101 further determines that at least one remaining valid entry ismodified. Accordingly, since portion 120 b includes at least one invalidentry (entries 230 j-230 l) and at least one valid modified entry (entry230 p), a cache tag corresponding to portion 120 b is updated toindicate the partial state.

At block 850, the method further includes maintaining, by cachecontroller circuit 101, a valid-entry value indicating entries ofportion 120 b that are included in the second sub-portion. In FIG. 5 , avalid-entry value (also referred to herein as a “mask value” or simply“mask”) is generated when a portion includes one or more invalidentries, using bit values of “1” to indicate valid entries and bitvalues of “0” to indicate invalid entries. Mask 565 is generated inresponse to the invalidation of entries in portion 120 b based onnotification 570, mask 565 indicating that entries 230 i and 230 m-230 pare in the second (valid) sub-portion and entries 230 j-230 l are in thefirst (invalid) sub-portion.

Method 800, at block 860, includes storing, by cache controller circuit101, the valid-entry value in a given entry of the first sub-portion ofportion 120 b. As shown in FIG. 5 , one of the invalid entries in thefirst sub-portion is replaced with mask 565. As previously described,mask 565 is always stored in the most significant entry of an associatedportion in the illustrated examples. In other embodiments, a differentone of the entries may be used for storing mask 565. Storing mask 565includes shifting values in all valid entries (clean or modified) to thenext least significant entry until a first invalid entry is overwritten.In FIG. 5 , data values 335 m-335 p are shifted into entries 230 l-230o, and mask 565 is placed into entry 230 p.

In various embodiments, method 800 may end in block 860, or may repeatsome or all operations. For example, method 800 may return to block 830in response to receiving a different notification. It is noted thatmethod 800 is a simplified example for managing receipt of anotification in a cache memory system. Performance of various operationsof methods 600, 700, and 800 may be performed concurrently and/or in aninterleaved fashion. For example, cache controller circuit 101 may beconfigured to manage multiple memory requests, thereby allowing fordifferent processor circuits to issue overlapping memory requests forvalues cached in different cache lines of cache memory system 105. Forexample, a first read request to portion 120 a may be performed by cachecontroller circuit 101 while a notification associated with portion 122b is received. Accordingly, method 800 may be performed while method 600is in progress.

Use of the circuits and methods disclosed herein may enable a cachememory system to be implemented that allows validity tracking down to aword or byte level, while retaining other management functions at acache line level and/or portions of the cache line that include multiplewords/bytes. Such a cache memory system may provide an increased levelof flexibility and efficiency as compared to a cache memory system inwhich management of cached data is performed at the cache line level.

FIGS. 1-8 illustrate circuits and methods for a system that includes acache memory system capable of tracking validity to a byte or wordlevel. Any embodiment of the disclosed systems may be included in one ormore of a variety of computer systems, such as a desktop computer,laptop computer, smartphone, tablet, wearable device, and the like. Insome embodiments, the circuits described above may be implemented on asystem-on-chip (SoC) or other type of integrated circuit. A blockdiagram illustrating an embodiment of computer system 900 is illustratedin FIG. 9 . Computer system 900 may, in some embodiments, include anydisclosed embodiment of system 100.

In the illustrated embodiment, the system 900 includes at least oneinstance of a system on chip (SoC) 906 which may include multiple typesof processing circuits, such as a central processing unit (CPU), agraphics processing unit (GPU), or otherwise, a communication fabric,and interfaces to memories and input/output devices. In someembodiments, one or more processors in SoC 906 includes multipleexecution lanes and an instruction issue queue. In various embodiments,SoC 906 is coupled to external memory 902, peripherals 904, and powersupply 908.

A power supply 908 is also provided which supplies the supply voltagesto SoC 906 as well as one or more supply voltages to the memory 902and/or the peripherals 904. In various embodiments, power supply 908represents a battery (e.g., a rechargeable battery in a smart phone,laptop or tablet computer, or other device). In some embodiments, morethan one instance of SoC 906 is included (and more than one externalmemory 902 is included as well).

The memory 902 is any type of memory, such as dynamic random accessmemory (DRAM), synchronous DRAM (SDRAM), double data rate (DDR, DDR2,DDR3, etc.) SDRAM (including mobile versions of the SDRAMs such asmDDR3, etc., and/or low power versions of the SDRAMs such as LPDDR2,etc.), RAMBUS DRAM (RDRAM), static RAM (SRAM), etc. One or more memorydevices are coupled onto a circuit board to form memory modules such assingle inline memory modules (SIMMs), dual inline memory modules(DIMMs), etc. Alternatively, the devices are mounted with a SoC or anintegrated circuit in a chip-on-chip configuration, a package-on-packageconfiguration, or a multi-chip module configuration.

The peripherals 904 include any desired circuitry, depending on the typeof system 900. For example, in one embodiment, peripherals 904 includesdevices for various types of wireless communication, such as Wi-Fi,Bluetooth, cellular, global positioning system, etc. In someembodiments, the peripherals 904 also include additional storage,including RAM storage, solid state storage, or disk storage. Theperipherals 904 include user interface devices such as a display screen,including touch display screens or multitouch display screens, keyboardor other input devices, microphones, speakers, etc.

As illustrated, system 900 is shown to have application in a wide rangeof areas. For example, system 900 may be utilized as part of the chips,circuitry, components, etc., of a desktop computer 910, laptop computer920, tablet computer 930, cellular or mobile phone 940, or television950 (or set-top box coupled to a television). Also illustrated is asmartwatch and health monitoring device 960. In some embodiments, thesmartwatch may include a variety of general-purpose computing relatedfunctions. For example, the smartwatch may provide access to email,cellphone service, a user calendar, and so on. In various embodiments, ahealth monitoring device may be a dedicated medical device or otherwiseinclude dedicated health related functionality. For example, a healthmonitoring device may monitor a user's vital signs, track proximity of auser to other users for the purpose of epidemiological socialdistancing, contact tracing, provide communication to an emergencyservice in the event of a health crisis, and so on. In variousembodiments, the above-mentioned smartwatch may or may not include someor any health monitoring related functions. Other wearable devices 970are contemplated as well, such as devices worn around the neck, devicesattached to hats or other headgear, devices that are implantable in thehuman body, eyeglasses designed to provide an augmented and/or virtualreality experience, and so on.

System 900 may further be used as part of a cloud-based service(s) 980.For example, the previously mentioned devices, and/or other devices, mayaccess computing resources in the cloud (i.e., remotely located hardwareand/or software resources). Also illustrated in FIG. 9 is theapplication of system 900 to various modes of transportation 990. Forexample, system 900 may be used in the control and/or entertainmentsystems of aircraft, trains, buses, cars for hire, private automobiles,waterborne vessels from private boats to cruise liners, scooters (forrent or owned), and so on. In various cases, system 900 may be used toprovide automated guidance (e.g., self-driving vehicles), generalsystems control, and otherwise.

It is noted that the wide variety of potential applications for system900 may include a variety of performance, cost, and power consumptionrequirements. Accordingly, a scalable solution enabling use of one ormore integrated circuits to provide a suitable combination ofperformance, cost, and power consumption may be beneficial. These andmany other embodiments are possible and are contemplated. It is notedthat the devices and applications illustrated in FIG. 9 are illustrativeonly and are not intended to be limiting. Other devices are possible andare contemplated.

As disclosed in regards to FIG. 9 , computer system 900 may include oneor more integrated circuits included within a personal computer, smartphone, tablet computer, or other type of computing device. A process fordesigning and producing an integrated circuit using design informationis presented below in FIG. 10 .

FIG. 10 is a block diagram illustrating an example of a non-transitorycomputer-readable storage medium that stores circuit design information,according to some embodiments. The embodiment of FIG. 10 may be utilizedin a process to design and manufacture integrated circuits, for example,system 100 as shown in FIG. 1 . In the illustrated embodiment,semiconductor fabrication system 1020 is configured to process thedesign information 1015 stored on non-transitory computer-readablestorage medium 1010 and fabricate integrated circuit 1030 (e.g., system100) based on the design information 1015.

Non-transitory computer-readable storage medium 1010, may comprise anyof various appropriate types of memory devices or storage devices.Non-transitory computer-readable storage medium 1010 may be aninstallation medium, e.g., a CD-ROM, floppy disks, or tape device; acomputer system memory or random-access memory such as DRAM, DDR RAM,SRAM, EDO RAM, Rambus RAM, etc.; a non-volatile memory such as a Flash,magnetic media, e.g., a hard drive, or optical storage; registers, orother similar types of memory elements, etc. Non-transitorycomputer-readable storage medium 1010 may include other types ofnon-transitory memory as well or combinations thereof. Non-transitorycomputer-readable storage medium 1010 may include two or more memorymediums which may reside in different locations, e.g., in differentcomputer systems that are connected over a network.

Design information 1015 may be specified using any of variousappropriate computer languages, including hardware description languagessuch as, without limitation: VHDL, Verilog, SystemC, SystemVerilog,RHDL, M, MyHDL, etc. Design information 1015 may be usable bysemiconductor fabrication system 1020 to fabricate at least a portion ofintegrated circuit 1030. The format of design information 1015 may berecognized by at least one semiconductor fabrication system, such assemiconductor fabrication system 1020, for example. In some embodiments,design information 1015 may include a netlist that specifies elements ofa cell library, as well as their connectivity. One or more celllibraries used during logic synthesis of circuits included in integratedcircuit 1030 may also be included in design information 1015. Such celllibraries may include information indicative of device or transistorlevel netlists, mask design data, characterization data, and the like,of cells included in the cell library.

Integrated circuit 1030 may, in various embodiments, include one or morecustom macrocells, such as memories, analog or mixed-signal circuits,and the like. In such cases, design information 1015 may includeinformation related to included macrocells. Such information mayinclude, without limitation, schematics capture database, mask designdata, behavioral models, and device or transistor level netlists. Asused herein, mask design data may be formatted according to graphic datasystem (gdsii), or any other suitable format.

Semiconductor fabrication system 1020 may include any of variousappropriate elements configured to fabricate integrated circuits. Thismay include, for example, elements for depositing semiconductormaterials (e.g., on a wafer, which may include masking), removingmaterials, altering the shape of deposited materials, modifyingmaterials (e.g., by doping materials or modifying dielectric constantsusing ultraviolet processing), etc. Semiconductor fabrication system1020 may also be configured to perform various testing of fabricatedcircuits for correct operation.

In various embodiments, integrated circuit 1030 is configured to operateaccording to a circuit design specified by design information 1015,which may include performing any of the functionality described herein.For example, integrated circuit 1030 may include any of various elementsshown or described herein. Further, integrated circuit 1030 may beconfigured to perform various functions described herein in conjunctionwith other components.

As used herein, a phrase of the form “design information that specifiesa design of a circuit configured to . . . ” does not imply that thecircuit in question must be fabricated in order for the element to bemet. Rather, this phrase indicates that the design information describesa circuit that, upon being fabricated, will be configured to perform theindicated actions or will include the specified components.

The present disclosure includes references to “embodiments,” which arenon-limiting implementations of the disclosed concepts. References to“an embodiment,” “one embodiment,” “a particular embodiment,” “someembodiments,” “various embodiments,” and the like do not necessarilyrefer to the same embodiment. A large number of possible embodiments arecontemplated, including specific embodiments described in detail, aswell as modifications or alternatives that fall within the spirit orscope of the disclosure. Not all embodiments will necessarily manifestany or all of the potential advantages described herein.

Unless stated otherwise, the specific embodiments are not intended tolimit the scope of claims that are drafted based on this disclosure tothe disclosed forms, even where only a single example is described withrespect to a particular feature. The disclosed embodiments are thusintended to be illustrative rather than restrictive, absent anystatements to the contrary. The application is intended to cover suchalternatives, modifications, and equivalents that would be apparent to aperson skilled in the art having the benefit of this disclosure.

Particular features, structures, or characteristics may be combined inany suitable manner consistent with this disclosure. The disclosure isthus intended to include any feature or combination of featuresdisclosed herein (either explicitly or implicitly), or anygeneralization thereof. Accordingly, new claims may be formulated duringprosecution of this application (or an application claiming prioritythereto) to any such combination of features. In particular, withreference to the appended claims, features from dependent claims may becombined with those of the independent claims and features fromrespective independent claims may be combined in any appropriate mannerand not merely in the specific combinations enumerated in the appendedclaims.

For example, while the appended dependent claims are drafted such thateach depends on a single other claim, additional dependencies are alsocontemplated, including the following: Claim 3 (could depend from any ofclaims 1-2); claim 4 (any preceding claim); claim 5 (claim 4), etc.Where appropriate, it is also contemplated that claims drafted in onestatutory type (e.g., apparatus) suggest corresponding claims of anotherstatutory type (e.g., method).

Because this disclosure is a legal document, various terms and phrasesmay be subject to administrative and judicial interpretation. Publicnotice is hereby given that the following paragraphs, as well asdefinitions provided throughout the disclosure, are to be used indetermining how to interpret claims that are drafted based on thisdisclosure.

References to the singular forms such “a,” “an,” and “the” are intendedto mean “one or more” unless the context clearly dictates otherwise.Reference to “an item” in a claim thus does not preclude additionalinstances of the item.

The word “may” is used herein in a permissive sense (i.e., having thepotential to, being able to) and not in a mandatory sense (i.e., must).

The terms “comprising” and “including,” and forms thereof, areopen-ended and mean “including, but not limited to.”

When the term “or” is used in this disclosure with respect to a list ofoptions, it will generally be understood to be used in the inclusivesense unless the context provides otherwise. Thus, a recitation of “x ory” is equivalent to “x or y, or both,” covering x but not y, y but notx, and both x and y. On the hand, a phrase such as “either x or y, butnot both” makes clear that “or” is being used in the exclusive sense.

A recitation of “w, x, y, or z, or any combination thereof” or “at leastone of . . . w, x, y, and z” is intended to cover all possibilitiesinvolving a single element up to the total number of elements in theset. For example, given the set [w, x, y, z], these phrasings cover anysingle element of the set (e.g., w but not x, y, or z), any two elements(e.g., w and x, but not y or z), any three elements (e.g., w, x, and y,but not z), and all four elements. The phrase “at least one of . . . w,x, y, and z” thus refers to at least one of element of the set [w, x, y,z], thereby covering all possible combinations in this list of options.This phrase is not to be interpreted to require that there is at leastone instance of w, at least one instance of x, at least one instance ofy, and at least one instance of z.

Various “labels” may proceed nouns in this disclosure. Unless contextprovides otherwise, different labels used for a feature (e.g., “firstcircuit,” “second circuit,” “particular circuit,” “given circuit,” etc.)refer to different instances of the feature. The labels “first,”“second,” and “third” when applied to a particular feature do not implyany type of ordering (e.g., spatial, temporal, logical, etc.), unlessstated otherwise.

Within this disclosure, different entities (which may variously bereferred to as “units,” “circuits,” other components, etc.) may bedescribed or claimed as “configured” to perform one or more tasks oroperations. This formulation—[entity] configured to [perform one or moretasks]—is used herein to refer to structure (i.e., something physical).More specifically, this formulation is used to indicate that thisstructure is arranged to perform the one or more tasks during operation.A structure can be said to be “configured to” perform some task even ifthe structure is not currently being operated. Thus, an entity describedor recited as “configured to” perform some task refers to somethingphysical, such as a device, circuit, memory storing program instructionsexecutable to implement the task, etc. This phrase is not used herein torefer to something intangible.

The hardware circuits may include any combination of combinatorial logiccircuitry, clocked storage devices such as flops, registers, latches,etc., finite state machines, memory such as static random access memoryor embedded dynamic random access memory, custom designed circuitry,analog circuitry, programmable logic arrays, etc. Similarly, variousunits/circuits/components may be described as performing a task ortasks, for convenience in the description. Such descriptions should beinterpreted as including the phrase “configured to.”

In an embodiment, hardware circuits in accordance with this disclosuremay be implemented by coding the description of the circuit in ahardware description language (HDL) such as Verilog or VHDL. The HDLdescription may be synthesized against a library of cells designed for agiven integrated circuit fabrication technology, and may be modified fortiming, power, and other reasons to result in a final design databasethat may be transmitted to a foundry to generate masks and ultimatelyproduce the integrated circuit. Some hardware circuits or portionsthereof may also be custom-designed in a schematic editor and capturedinto the integrated circuit design along with synthesized circuitry. Theintegrated circuits may include transistors and may further includeother circuit elements (e.g. passive elements such as capacitors,resistors, inductors, etc.) and interconnect between the transistors andcircuit elements. Some embodiments may implement multiple integratedcircuits coupled together to implement the hardware circuits, and/ordiscrete elements may be used in some embodiments. Alternatively, theHDL design may be synthesized to a programmable logic array such as afield programmable gate array (FPGA) and may be implemented in the FPGA.

The term “configured to” is not intended to mean “configurable to.” Anunprogrammed FPGA, for example, would not be considered to be“configured to” perform some specific function. This unprogrammed FPGAmay be “configurable to” perform that function, however.

Reciting in the appended claims that a structure is “configured to”perform one or more tasks is expressly intended not to invoke 35 U.S.C.§ 112(f) for that claim element. Should Applicant wish to invoke Section112(f) during prosecution, it will recite claim elements using the“means for” [performing a function] construct.

The phrase “based on” is used to describe one or more factors thataffect a determination. This term does not foreclose the possibilitythat additional factors may affect the determination. That is, adetermination may be solely based on specified factors or based on thespecified factors as well as other, unspecified factors. Consider thephrase “determine A based on B.” This phrase specifies that B is afactor that is used to determine A or that affects the determination ofA. This phrase does not foreclose that the determination of A may alsobe based on some other factor, such as C. This phrase is also intendedto cover an embodiment in which A is determined based solely on B. Asused herein, the phrase “based on” is synonymous with the phrase “basedat least in part on.”

The phrase “in response to” describes one or more factors that triggeran effect. This phrase does not foreclose the possibility thatadditional factors may affect or otherwise trigger the effect. That is,an effect may be solely in response to those factors, or may be inresponse to the specified factors as well as other, unspecified factors.Consider the phrase “perform A in response to B.” This phrase specifiesthat B is a factor that triggers the performance of A. This phrase doesnot foreclose that performing A may also be in response to some otherfactor, such as C. This phrase is also intended to cover an embodimentin which A is performed solely in response to B.

1-20. (canceled)
 21. An apparatus, comprising: a cache memory circuitconfigured to store a plurality of cache lines that include a pluralityof entries; a cache controller circuit configured to: receive a writerequest to an address associated with a particular cache line, whereinthe write request includes new values for a proper subset of entries inthe particular cache line; and in response to a determination that astatus of the particular cache line indicates that at least a firstportion of the particular cache line is invalid and at least a secondportion of the particular cache line is modified relative to memorylocations at the associated address in a memory: retrieve a mask valuethat indicates valid and invalid entries of the particular cache line;store the new values in the proper subset of entries; and update themask value based on the store to the proper subset of entries.
 22. Theapparatus of claim 21, wherein the cache controller circuit is furtherconfigured to determine, using the updated mask value, whether any entryin the particular cache line remains invalid after the storing.
 23. Theapparatus of claim 22, wherein the cache controller circuit is furtherconfigured to: in response to a determination that one or more of theentries are invalid, store the updated mask value in place of at leastone of the one or more entries.
 24. The apparatus of claim 23, whereinto store the updated mask value, the cache controller circuit isconfigured to: identify a particular invalid entry in the particularcache line, based on a significance of a position of the particularinvalid entry within the particular cache line; shift a subset of validentries based on a significance of positions of the subset of validentries within the particular cache line; and store the updated maskvalue in a given entry vacated by the shifting.
 25. The apparatus ofclaim 22, wherein the cache controller circuit is further configured to,in response to a determination that none of the entries are invalid:update the status of the particular cache line to indicate all theentries of the particular cache line are valid; and discard the updatedmask value.
 26. The apparatus of claim 21, wherein the cache controllercircuit is further configured to access the status of the particularcache line in a corresponding cache tag.
 27. The apparatus of claim 21,wherein the cache controller circuit is further configured to send arequest to a memory controller to store the new values in the propersubset of entries of the particular cache line to locations in thememory corresponding to the address.
 28. The apparatus of claim 21,wherein the cache controller circuit is further configured to: trackvalidity of data stored in a given cache line for individual entries ofthe given cache line; and maintain respective cache tags for a pluralityof portions of the given cache line.
 29. The apparatus of claim 21,wherein the cache controller circuit is further configured to: receive anotification that values for memory locations in the memory thatcorrespond to one or more of the entries of the particular cache linehave been modified outside of the cache memory circuit; and update themask value based on the notification.
 30. A method comprising: setting,by a cache controller circuit coupled to a cache memory circuit, a valuein a cache tag associated with a particular cache line to indicate apartial state, the partial state indicative of an invalid first portionand a modified second portion of the particular cache line; receiving,by the cache controller circuit, a partial write request for an addressassociated with the particular cache line, wherein the partial writerequest includes new values for a proper subset of entries in theparticular cache line; storing, by the cache controller circuit, validvalues of the partial write request in corresponding entries of theparticular cache line without modifying remaining entries in theparticular cache line; in response to the cache tag indicating thepartial state, accessing, by the cache controller circuit, a mask valuethat identifies entries of the invalid first portion; and updating, bythe cache controller circuit, the mask value based on the storing. 31.The method of claim 30, further comprising: in response to determining,by the cache controller circuit using the updated mask value, that oneor more of the entries of the particular cache line are invalid afterthe storing, writing the updated mask value in place of at least one ofthe invalid entries.
 32. The method of claim 30, further comprising:determining, by the cache controller circuit using the updated maskvalue, that all of the entries of the particular cache line are valid;updating, by the cache controller circuit, the value in the cache tag toindicate that all the entries are valid; and invalidating, by the cachecontroller circuit, the updated mask value.
 33. The method of claim 30,further comprising: receiving, by the cache controller circuit, anotification that values for one or more memory locations in a memorycorresponding to one or more of the entries of the particular cache linehave been modified outside of the cache memory circuit; and updating themask value based on the notification.
 34. The method of claim 33,further comprising: in response to receiving the notification,determining, by the cache controller circuit, that a current state ofthe particular cache line indicates that all entries of the particularcache line valid; and in response to the determining, updating the stateof the particular cache line to indicate that a particular portion ofthe entries is invalid.
 35. A system, comprising: a memory circuit; aprocessor circuit configured to generate read and write requests foraddresses in the memory circuit; and a cache memory system configuredto: indicate, for a particular cache line, a partial state indicatingthat the particular cache line currently includes a first portion ofentries that is invalid and a second portion of entries that is modifiedrelative to memory locations at a corresponding address in the memorycircuit, wherein a mask value is used to indicate the first portion ofentries; in response to receiving a write request from the processorcircuit for an address associated with the particular cache line, storenew values for a proper subset of entries in the particular cache line;and update the mask value based on the storing.
 36. The system of claim35, wherein the cache memory system is further configured to: trackvalidity of data stored in individual bytes of the particular cacheline; maintain a cache tag for the particular cache line; and store astatus of a current state of the particular cache line in the cache tag.37. The system of claim 36, wherein the cache memory system is furtherconfigured to: in response to a determination that one or more of theentries of the particular cache line are invalid after the storing, setthe status in the cache tag to the partial state.
 38. The system ofclaim 36, wherein the cache memory system is further configured to: inresponse to a determination that no entries of the particular cache lineare invalid after the storing, set the status in the cache tag to avalid modified state that indicates that at least one entry is modifiedand no entries are invalid.
 39. The system of claim 35, wherein thecache memory system is further configured to: in response to receiving anotification that values for one or more memory locations in the memorycircuit corresponding to one or more of the entries of the particularcache line have been modified outside of the cache memory system, updatethe mask value based on the notification.
 40. The system of claim 39,wherein the cache memory system is further configured to: in response toreceiving the notification, determine that an indicated state of theparticular cache line indicates that all entries of the particular cacheline valid; and in response to the determination, update the state ofthe particular cache line to indicate that a particular portion of theentries is invalid.